package com.qushiyun.devops.admin.sync.data.po;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import java.util.Date;
import lombok.Data;

/**
 * 表同步条件
 *
 * @author zhouzx
 */
@Data
@TableName("sync_condition_config")
public class ConditionConfig {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;

    private Integer type;

    private Integer overWrite;

    @TableField(value = "table_list", typeHandler = FastjsonTypeHandler.class)
    private JSONArray tableList;

    @TableField(value = "all_table", typeHandler = FastjsonTypeHandler.class)
    private JSONArray allTable;

    @TableField(value = "ignore_table", typeHandler = FastjsonTypeHandler.class)
    private JSONArray ignoreTable;

    @TableField(value = "tenant_global_table", typeHandler = FastjsonTypeHandler.class)
    private JSONArray tenantAndGlobalTable;

    @TableField(value = "no_data_table", typeHandler = FastjsonTypeHandler.class)
    private JSONArray noDataTable;

    @TableField("condition_str")
    private String conditionStr;

    @TableLogic(value = "0")
    private Integer delFlag;
    private Long createBy;

    private Date createTime;
    private Date updateTime;
}